package pattern5;

/**
 * 工厂方法模式
 * @author wdl
 */
public class FactoryPattern {
    public static void main(String[] args) {
        IFactory operFactory=new AddFactory();
        AbstractOperation addOperation=operFactory.createOperation();
        addOperation.numberA=10;
        addOperation.numberB=20;
        System.out.println(addOperation.getResult());
    }
}
